1

有时候项目使用到的__jar__包在__maven__库里面找不到而存在本地,这时可以直接在__pom.xml__中将该__jar__包通过配置加入到项目的依赖中,具体的配置如下:

<dependency>   
    <groupId>group-id</groupId>   
    <artifactId>artifact-id</artifactId>   
    <version>2.0</version>   
    <scope>system</scope>   
    <systemPath>${project.basedir}/src/main/xxx</systemPath>   
</dependency>
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-war-plugin</artifactId>
    <version>2.1.1</version>
    <configuration>
        <webResources>
            <resource>
                <directory>${project.basedir}/src/main/resources/lib</directory>
                <targetPath>WEB-INF/lib</targetPath>
                <filtering>false</filtering>
                <includes>
                    <include>**/*.jar</include>
                </includes>
            </resource>
        </webResources>
    </configuration>
</plugin>`

lncwwn
110 声望2 粉丝

引用和评论

0 条评论